#include "pix5core.h"

	
Array<Table*> DB::_tables;


void DB::init()
{
}

void DB::shutdown()
{
	_tables.clearDelete();
}

	
void DB::openTable(Table* table)
{
	table->_basePath = String("root:/home/juun/pix5/db/")+table->getName();
	table->_baseBackupPath = String("root:/home/juun/pix5/db/backup/")+table->getName();

	try
	{
		// Load the table definition
		table->loadDef();
	}
	catch(Error)
	{
		delete table;
		throw;
	}

	_tables.add(table);
}


